﻿<div class="hidden sm:block absolute top-0 right-0 pt-4 pr-4">
    <button type="button" @onclick="() => OnClose.InvokeAsync(null)" title=@Title
            class="bg-white dark:bg-black rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
        <span class="sr-only">Close</span>
        <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"
            aria-hidden="true">
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
        </svg>
    </button>
</div>

@code {
    [Parameter, EditorRequired]
    public EventCallback OnClose { get; set; }

    [Parameter]
    public string Title { get; set; } = "Close";
}
